import { ObservationWriter } from "../ObservationWriter";
import { ReflectionSensorBase, ReflectionSensorInfo } from "./ReflectionSensorBase";

export class Vector2ReflectionSensor extends ReflectionSensorBase {

    constructor(reflectionSensorInfo: ReflectionSensorInfo) {
        super(reflectionSensorInfo, 2);
    }

    writeReflectedField(writer: ObservationWriter): void {
        const vector2 = this.getReflectionValue();
        writer.setItem(0, vector2.x);
        writer.setItem(1, vector2.y);
    }

}